<html>
<head>
<title>Create Data Binding Wizard</title>
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
<link href="../../../../book.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF">
    <h1>Create Data Binding Wizard</h1>
	<h3>Supported for JDK 1.5 
	and above only</h3>
	<p class="pnoall">The tool provides two ways to quickly create new Data 
	Bindings: the <b>Data Bindings</b> menu and the <b>bindings property</b> in 
	the property pane.</p>
	<table border="0" cellpadding="0" cellspacing="0" id="table1" width="820">
		<tr>
			<td valign="top">
			<h2>Data Binding Menu</h2>
			<p>The <b>Data Bindings</b> menu provides the ability to 
	quickly create a data binding for a widget. If the widget does not 
	have any data bindings, the menu immediately cascades out to show the 
	available properties of the widget that can be bound to a model property. If 
	the widget has existing data bindings, those are shown at the top of the 
	cascaded menu and a list of widget properties is shown in a submenu. 
				Clicking on an unbound property will open the <b>Create Data 
				Binding</b> wizard.<br>&nbsp;</td>
			<td width="20" valign="top">&nbsp;</td>
			<td valign="top">
			<h2>Bindings Property</h2>
			<p class="pnoall">The <b>bindings property</b> in the property 
				pane opens up to show a list of all bindable properties of the 
				widget. Clicking the
			<img border="0" src="images/dot-dot-dot-button.gif" width="20" height="13" align="bottom"> 
				button next to an unbound property will open the <b>Create Data 
				Binding</b> wizard.</p></td>
		</tr>
		<tr>
			<td align="center"><img border="0" src="images/data_binding_menu.gif"></td>
			<td width="20">&nbsp;</td>
			<td>
			<img border="0" src="images/data_binding_property_pane1.gif"></td>
		</tr>
	</table>
	<h2>
	Choose Model</h2>
	<p class="pnoall">
	The first page of the <b>Create Data Binding</b> wizard is used to select 
	the model and property to bind the selected target property to. Two types 
	of targets and models are supported: <b>
		<img border="0" src="images/data_binding_beans_button.gif" align="absbottom"> 
		Beans</b> and <b>
		<img border="0" src="images/data_binding_widgets_button.gif" width="23" height="22" align="absbottom"> 
		Widgets</b>. The filter field above the list can be used to filter the 
	list of items. The
		<img border="0" src="images/clear_filter_button.gif" width="23" height="22" align="absbottom"> 
		clear button can be used to clear the filter and restore the full list.</p>
	<div align="left">
		<div align="left">
			<table border="0" cellpadding="5" cellspacing="0" id="table3">
				<tr>
					<td rowspan="2">
					<img border="0" src="images/create_data_binding1.gif"></td>
					<td valign="top" width="225">
					<ul>
						<li><b>
						<img border="0" src="images/data_binding_beans_button.gif" align="absbottom"> 
		Beans</b>: any field of the current compilation unit may be selected.</li>
					</ul>
					</td>
					<td valign="top">
					<img border="0" src="images/create_data_binding_model_beans.gif"></td>
				</tr>
				<tr>
					<td valign="top" width="225">
					<ul>
						<li><b>
						<img border="0" src="images/data_binding_widgets_button.gif" width="23" height="22" align="absbottom"> 
		Widgets</b>: any widget in the current compilation unit may be selected.</li>
					</ul>
					</td>
					<td valign="top">
					<img border="0" src="images/create_data_binding_model_widgets.gif"></td>
				</tr>
				</table>
		</div>
	<p class="pnoall">When any <b>Model</b> object is selected, 
	</p>
	<p class="pnoall">its properties (bean fields or standard Swing widget 
	properties) are shown in the associated <b>Properties</b> list. Properties may be expanded to show 
	their nested attributes. A drop down filter menu is 
	available to filter the Property list by type and hide or show the advanced 
	properties. Supported filters are <b>
	String</b>, <b>Boolean</b>, <b>Numbers</b>, <b>Color</b>, <b>Font </b>and <b>
	Image</b>.</p>
	<p class="pnoall">
	<img border="0" src="images/properties.gif" align="top">
	<img border="0" src="images/properties_expanded.gif" align="top" width="171" height="346">
	<img border="0" src="images/properties_filtered.gif" align="top">
	<img border="0" src="images/properties_advanced.gif" width="292" height="339">
	<img border="0" src="images/filter_button.gif" align="top"></p>
		<p>Once the model property has been selected, click the <b>Finish</b> 
		button to create a new data binding using default options. If you wish 
		to customize the properties of the data binding, click the <b>Next</b> 
		button to go to the second page of the wizard.</p>
	<h2>
	Properties</h2>
		<p class="pnoall">
	The second page of the <b>Create Data Binding</b> wizard is used to 
	customize the properties of the data binding itself. When creating a 
	binding, the update strategy from <b>
	target to model</b> and <b>model to target</b> may be specified as well as 
	any strategy-specific properties (validators and converters).&nbsp; </p>
		<div align="left">
			<table border="0" cellpadding="0" cellspacing="0" id="table4">
				<tr>
					<td valign="top">
					<img border="0" src="images/create_data_binding2.gif" align="top"></td>
					<td width="20">&nbsp;</td>
					<td width="500" valign="top">
	<p class="pnoall">When the Target or Model is a Text widget and the text 
	property is selected, the triggering event may be specified as <b>Swing.Modify</b>,
	<b>Swing.FocusOut</b> or <b>Swing.NONE</b>.</p>
	<p class="pnoall">
	<img border="0" src="images/text_events.gif"></p>
	<p class="pnoall">Predefined update value strategies - <b>READ_ONCE</b>,
	<b>READ</b> and <b>READ_WRITE</b> - may be selected.</p>
	<p class="pnoall">
	<img border="0" src="images/update_value_strategy.gif" align="top"></p>
					</td>
				</tr>
			</table>
	<h2>
	Source</h2>
			<p class="pnoall">Clicking the <b>Finish</b> button will generate 
			the necessary data binding code which may then be seen in the <b>Source</b> 
			view. An <b>initDataBindings()</b> method is created, if it does not 
			already exist and a call to that method is added to the end of the 
			widget creation process. Within the <b>initDataBindings()</b> 
			method, any needed bean properties are created followed by the 
			creation of each binding.</p>
			<p class="pnoall">
			<img border="0" src="images/data_binding_source2.gif"></p>
			<p class="pnoall"><i><b>Warning: </b>do not edit the <b>
			initDataBinding()</b> method by hand (without carefully matching the 
			code generation pattern used by the tool) as it will be regenerated 
			in its entirety any time the tool needs to add, remove or update a 
			data binding.</i></div>
	</div>
          </body>
</html>